package com.ssy.lingxi.purchase.api.feign;

import com.ssy.lingxi.common.response.Wrapper;
import com.ssy.lingxi.purchase.api.dto.request.RequisitionQuantityDeductReq;
import com.ssy.lingxi.purchase.api.fallback.PurchaseRequisitionFallback;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

/**
 * 采购请购单内部接口
 * @author wyx
 * @version 2.0.0
 * @date 2021-11-08
 */
@FeignClient(value = "purchase-service", fallback = PurchaseRequisitionFallback.class)
public interface PurchaseRequisitionFeign {
    /**
     * 请购单转请购订单扣减请购数量、增加已转订单数量内部接口
     * @param req 请求参数
     * @return 操作结果
     */
    @RequestMapping(value = "/purchase/inner/requisition/quantity/deduct", method = RequestMethod.POST)
    Wrapper<Void> requisitionQuantityDeduct(@RequestBody RequisitionQuantityDeductReq req);
}
